// import NProgress from "nprogress"; 
// import "nprogress/nprogress.css";
// NProgress.configure({ showSpinner: false }); 

export function setupPermission(router) {
  router.beforeEach((to, from, next) => {
    //   NProgress.start();
    console.log("======from>>>>====", from);
    console.log("======to>>>>====", to);
    document.title = `${to.meta.title}`;
    next();
    //   NProgress.done();
  });

  router.afterEach(to => {
    // NProgress.done(); // finish progress bar
  });
}
